<!--优惠活动页面-->
{include file="public/header"}
</head>
<style type="text/css">
	.title{
		margin-bottom: 7px;
		margin-top: 10px;
		margin-left: 10px;
		font-size: 16px;
	}
	.img_box{
		margin-left: 7px;
	}
	.sub{
		font-size: 12px;
		color: #666;
		padding-left: 8px;
		margin-top: 3px;
		margin-bottom: 5px;
	}
	.header #reveal-left-app{width:30px;height:24px;background-size:cover;margin-top:8px;margin-left:4%;}
</style>
<body><!-- onload='loaded()' -->
<div class="header">
	<div class="headerTop" style="margin-left:2%;">
		<div class="ui-toolbar-left">
			<button id="reveal-left-app" onClick="jumpBack()">reveal</button>
		</div>
		<h1 class="ui-toolbar-title">优惠活动</h1>
	</div>
</div>
<div class="lott-menu">

</div>
<div style="width:98%; margin:auto; margin-top:50px;">
	{foreach $youhui_list as $k=>$youhui_single}
	<div class='box' style="width: 98%;margin: auto;margin-top: 10px;border: 1px solid #ccc;border-radius: 6px;">
		<p class="title">{$youhui_single.title}</p>
		<div class='accordion-header'>
			<div class='show_box'>
				<div class='left img_box'><a href=" {:url('home/youhui_detail')}?id={$youhui_single.id}"><img src="__ATTACHMENT__/{$youhui_single.pic}"width='98%' height='50' alt='' style="border-radius: 3px;height: 243%;"></a></div>
			</div>
		</div>
		<p class="sub">活动时间：{$youhui_single.begin_time} 至 {$youhui_single.end_time}<span style="float: right;margin-right: 14px;"><a href=" {:url('home/youhui_detail')}?id={$youhui_single.id}">查看详情 >></a></span></p>
	</div>
	{/foreach}
</div>
</body>
<script>
	function jumpBack(){
		var appfrom = '{$appfrom}';
		if( 1==parseInt(appfrom) ){
			jump2app.jump2MainActivity();
		}else{
			WebViewJavascriptBridge.callHandler('backClick');
		}
	}
	function setupWebViewJavascriptBridge(callback) {
		if (window.WebViewJavascriptBridge) { return callback(WebViewJavascriptBridge); }
		if (window.WVJBCallbacks) { return window.WVJBCallbacks.push(callback); }
		window.WVJBCallbacks = [callback];
		var WVJBIframe = document.createElement('iframe');
		WVJBIframe.style.display = 'none';
		WVJBIframe.src = 'https://__bridge_loaded__';
		document.documentElement.appendChild(WVJBIframe);
		setTimeout(function() { document.documentElement.removeChild(WVJBIframe) }, 0)
	}
	setupWebViewJavascriptBridge(function(bridge) {
		/* Initialize your app here */
		bridge.registerHandler('JS Echo', function(data, responseCallback) {
			console.log("JS Echo called with:", data)
			responseCallback(data)
		})
		bridge.callHandler('ObjC Echo', {'key':'value'}, function responseCallback(responseData) {
			console.log("JS received response:", responseData)
		})
	})
</script>
</html>